<template>
    <StElDynamicForm
            @change="(form)=>{selectedAppCode = form.appCode}"
            :submit-props="{method: 'post',url: $stStringTools.replaceb(MpUrl.MpTempMsgIndustrySet,{appCode: selectedAppCode}),label: '确认设置'}"
            :options="formItems" :origin-prop="{inline: true,labelWidth: '100px'}"

    ></StElDynamicForm>
</template>

<script>
    import MpMixin from '../MpMixin.js'
    import MpUrl from '../MpUrl.js'
    export default {
        name: 'MpTempMsgIndustrySet',
        mixins:[MpMixin],
        components:{

        },
        data(){
            return {
                selectedAppCode: '',
                formItems:[
                    {
                        field: {
                            name: 'appCode'
                        },
                        element:{
                            type: 'select',
                            required: true,
                            options:{
                                datas: MpUrl.configList,
                                optionProp:{
                                    value: 'appCode',
                                    label: 'appName'
                                }
                            },
                            label: '公众号',
                        }
                    },
                    {
                        field: {
                            name: 'primaryIndustry'
                        },
                        element:{
                            type: 'select',
                            options:{
                                datas: MpUrl.MpTempMsgPrimaryIndustry,
                                isGroup: true
                            },
                            label: '主行业',
                            required: true
                        }
                    },
                    {
                        field: {
                            name: 'secondIndustry'
                        },
                        element:{
                            type: 'select',
                            options:{
                                datas: MpUrl.MpTempMsgSecondIndustry,
                                isGroup: true
                            },
                            label: '副行业',
                            required: true
                        }
                    },
                ]
            }
        },
        methods:{
        }
    }
</script>

<style scoped>

</style>